#彩图HSV的提取
import numpy as np
import cv2
imagepath="C:\\opencv\\opencv\\sources\\samples\\data\\lena.jpg"
image = cv2.imread(imagepath)
cv2.imshow("Original image",image)
cv2.waitKey(0)

#RGB 转换成 HSV空间
hsv = cv2.cvtColor(image,cv2.COLOR_BGR2HSV)
cv2.imshow("HSV",hsv)
cv2.waitKey(0)

#HSV分量的提取
(H,S,V) = cv2.split(hsv)#提取HSV分量
cv2.imshow("H",H)
cv2.imshow("S",S)
cv2.imshow("V",V)
cv2.waitKey(0)
